﻿<%@ Page Title="" Language="C#" MasterPageFile="~/UniversaleMain.Master" AutoEventWireup="true" CodeBehind="Forum.aspx.cs" Inherits="FYPDemo.WebForm3" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
        .searchcontent
        {
            margin:50px 250px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
   <h1 class="h1_title">Welcome to Univesale Forum</h1>
    
   
    <div>

        <asp:DropDownList ID="ddlCategory" runat="server" CssClass="search_section"></asp:DropDownList>
        <asp:Button ID="btnSearch" runat="server" Text="Search" 
            CssClass="search_section buttonbg" onclick="btnSearch_Click"/>        
        
        <asp:GridView ID="TitleGrid" runat="server" AllowPaging="True" 
          AutoGenerateColumns="False" PageSize="10" DataKeyNames="Title" 
            onselectedindexchanged="TitleGrid_SelectedIndexChanged"
            onpageindexchanging="TitleGrid_PageIndexChanging" CellPadding="4" 
            ForeColor="#333333" GridLines="None">
            <AlternatingRowStyle BackColor="White" />
            <Columns>
                <asp:TemplateField HeaderText="No." ControlStyle-CssClass="txt_middle"> 
                    <ItemTemplate>
                        <asp:Label ID="TextBox1" runat="server" Text="<%# Container.DataItemIndex + 1 %>" Width="50px"></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>

                <asp:TemplateField HeaderText="Title">
                    <ItemTemplate>
                        <script type="text/javascript">
                            var testing1 = '<%#Eval("Title") %>';
                         </script>
                         
                            <asp:LinkButton ID="linkTitle" runat="server" CommandArgument="Title" CommandName="Select" Text='<%#Bind("Title") %>' Width="600px" CssClass="txt_left"></asp:LinkButton>
                    </ItemTemplate>
                </asp:TemplateField>
             </Columns>
            <EditRowStyle BackColor="#7C6F57" />
            <FooterStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#666666" ForeColor="White" HorizontalAlign="Center" />
            <RowStyle BackColor="#E3EAEB" />
            <SelectedRowStyle BackColor="#C5BBAF" Font-Bold="True" ForeColor="#333333" />
            <SortedAscendingCellStyle BackColor="#F8FAFA" />
            <SortedAscendingHeaderStyle BackColor="#246B61" />
            <SortedDescendingCellStyle BackColor="#D4DFE1" />
            <SortedDescendingHeaderStyle BackColor="#15524A" />
          </asp:GridView>

        <div id="ForumList" runat="server" style="display:none">
            <asp:Label ID="lblForumList" runat="server" CssClass="searchcontent" Text="No record found."></asp:Label>
        </div>

          <asp:Button ID="addNewPost" runat="server" Text="New Post" 
            onclick="addNewPost_Click" CssClass="newpost_button buttonbg" Enabled="false" />
       </div>
</asp:Content>
